﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量    
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。    
	pageContext.setAttribute("basePath", basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>用户登录 </title>


		<link type="text/css" href="<%=basePath%>/mallstyle/css/header.css" rel="stylesheet" />
		<link type="text/css" href="<%=basePath%>/mallstyle/css/main.css" rel="stylesheet" />
		<link type="text/css" href="<%=basePath%>/mallstyle/css/footer.css" rel="stylesheet" />
		<link type="text/css" href="<%=basePath%>/mallstyle/css/qq.css" rel="stylesheet" />
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/index.js"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/jquery.js" charset="utf-8"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/common.js" charset="utf-8"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/cart.js" charset="utf-8"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/main.js" charset="utf-8"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/qq.js" charset="utf-8"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/kissy.js"></script>
		<script type="text/javascript" src="<%=basePath%>/mallstyle/js/switchable-pkg.js"></script>
		<!--[if lte IE 6]>
<script type="text/javascript" language="Javascript" src="<%=basePath%>/mallstyle/js/hoverforie6.js"></script>
<![endif]-->

		<script type="text/javascript">
			//<!CDATA[
			var SITE_URL = "http://www.999000.cn";
			var REAL_SITE_URL = "http://www.999000.cn";
			var PRICE_FORMAT = '¥%s';
			//]]>
		</script>

		<script charset="utf-8" type="text/javascript" src="<%=basePath%>/mallstyle/js/jquery.validate.js"></script>
		<script charset="utf-8" type="text/javascript" src="<%=basePath%>/mallstyle/js/jquery.poshytip.js"></script>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/mallstyle/css/tip-yellowsimple.css" />
		<!--<editmode></editmode>-->

		<script>
			var _hmt = _hmt || [];
			(function() {
				var hm = document.createElement("script");
				hm.src = "//hm.baidu.com/hm.js?dcaa35200cee94d622f4315114994082";
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(hm, s);
			})();
		</script>

	</head>

	<body>
		<div id="site-nav" class="w-full">
			<div class="shoptop w clearfix">
				<div class="login_info">
					hi, 游客
					<a href="#">请登录</a>
					<a href="#">免费注册</a>
				</div>
				<ul class="quick-menu">
					<li class="item">
						<div class="menu mytb">
							<a class="menu-hd" href="#">用户中心<b></b></a>
							<div class="menu-bd">
								<div class="menu-bd-panel">
									<div>
										<p>
											<a href="#">我的订单</a>
										</p>
										<p>
											<a href="#">我的好友</a>
										</p>
										<p>
											<a href="#">我的咨询</a>
										</p>
									</div>
								</div>
							</div>
						</div>
					</li>
					<li class="service">
						<a href="#">帮助中心</a>
					</li>
					<li class="service">
						<a href="#">手机客户端</a>
					</li>
				<!--
              	    <li class="service">
						<a href="#" target="_blank">久零画册</a>
					</li>  -->
					<li class="item" style="background:none">
						<div class="menu favorite">
							<a class="menu-hd" href="#">收藏夹<b></b></a>
							<div class="menu-bd">
								<div class="menu-bd-panel">
									<div>
										<p>
											<a href="#">收藏的宝贝</a>
										</p>
										<p>
											<a href="#">收藏的商家</a>
										</p>
									</div>
								</div>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
		<script type="text/javascript">
			$(function() {
				$('#login_form').validate({
					errorPlacement: function(error, element) {
						var error_td = element.parent('dd');
						error_td.find('label').hide();
						error_td.append(error);
					},
					success: function(label) {
						label.addClass('validate_right').text('OK!');
					},
					onkeyup: false,
					rules: {
						user_name: {
							required: true
						},
						password: {
							required: true
						},
						captcha: {
							required: true,
							remote: {
								url: 'index.php?app=captcha&act=check_captcha',
								type: 'get',
								data: {
									captcha: function() {
										return $('#captcha1').val();
									}
								}
							}
						}
					},
					messages: {
						user_name: {
							required: '您必须提供一个用户名'
						},
						password: {
							required: '您必须提供一个密码'
						},
						captcha: {
							required: '请输入右侧图片中的文字',
							remote: '验证码错误'
						}
					}
				});
			});

			function poshytip_message(obj, className, showOn, alignTo, alignX, offsetX, offsetY) {
				if(obj == undefined) return;
				if(className == undefined) className = 'tip-yellowsimple';
				if(showOn == undefined) showOn = 'focus';
				if(alignTo == undefined) alignTo = 'target';
				if(alignX == undefined) alignX = 'inner-left';
				if(offsetX == undefined) offsetX = 0;
				if(offsetY == undefined) offsetY = 5;

				obj.poshytip({
					className: className,
					showOn: showOn,
					alignTo: alignTo,
					alignX: alignX,
					offsetX: offsetX,
					offsetY: offsetY
				});
			}

			$(function() {
				poshytip_message($('#user_name'));
				poshytip_message($('#password'));
			});
		</script>
		<style>
			.w {
				width: 990px;
			}
		</style>
		<div id="main" class="w-full">
			<div id="page-login" class="w login-register mt20 mb20">
				<div class="w logo mb10">
					<a href="#" title="安阳师范网购系统！"><img alt="安阳师范网购系统！" src="<%=basePath%>/mallstyle/picture/logo.gif" /></a>
				</div>
				<div class="w clearfix">
					<div class="col-main">
						<div class="login-edit-field" area="login_left" widget_type="area">

							<div id="_widget_380" name="taocz_image_ads" widget_type="widget" class="widget">
								<div class="image_ads mb10" style="">
									<a href="#" target="_blank"><img width="450px" height="350px" src="<%=basePath%>/mallstyle/picture/201503110938344469.png" /></a>
								</div>

							</div>
						</div>
					</div>
					<div class="col-sub">
						<div class="form">
							<div class="title">用户登录</div>
							<div class="content">
								<form method="post" id="login_form"  action="<%=path%>/rest/user/login" >
									<dl class="clearfix">
										<dt>用户名</dt>
										<dd>
											<input class="input" type="text" id="user_name" name="uName" title="用户名即您注册用的手机号或会员卡号" />
											<div class="clr"></div><label></label>
										</dd>
									</dl>
									<dl class="clearfix">
										<dt>密&nbsp;&nbsp;&nbsp;码</dt>
										<dd>
											<input class="input" type="password" id="password" name="uPassword" title="请输入密码" />
											<div class="clr"></div><label></label>
										</dd>
									</dl>

									<dl class="clearfix">
										<dt>&nbsp;</dt>
										<dd class="clearfix">
											<input type="submit" class="login-submit" name="Submit" value="请登录" title="请登录" />
											<a href="#" class="find-password">忘记密码？</a>
											<input type="hidden" name="ret_url" value="http%3A%2F%2Fwww.999000.cn%2Findex.php" />
										</dd>
									</dl>
									<dl class="clearfix">
										<dt>&nbsp;</dt>
										<dd class="register-now">
											如果您还不是会员，请
											<a href="<%=path%>/rest/user/registerJsp" title="免费注册">注册</a>
										</dd>
									</dl>

								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

	</body>

</html>